<?php
$this->pageTitle = 'Manage Zone Name';
$this->menu = array(
    array('label' => Yii::t('app', 'Create') . ' ' . $model->label(), 'url' => array('create')),
);
?>
<script type="text/javascript">
    function ChangeStatus(id, status){
        $.ajax({
            url: "<?php echo $statuschangeurl; ?>",
            type: "post",
            data: "id=" + id + "&status=" + status,
            dataType: "html",
            success: function(msg) {
                $('#zone-name-grid').yiiGridView.update('zone-name-grid');

            }
        });

    }


</script>

<h3><?php echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2)); ?></h3>

<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'zone-name-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
   
    'columns' => array(
        
        'zone_name',
//        array(
//            'name' => 'state_id',
//            'type' => 'raw',
//            'value' => '$data->state_id',
//            'filter' => false,
//        ),
//        array(
//            'name' => 'country_id',
//            'type' => 'raw',
//            'value' => '$data->country_id',
//            'filter' => false,
//        ),
        array(
            'name' => 'status',
            'type' => 'raw',
            'value' => 'changeStatusIngridView($data)',
            'filter' => array('0' => Yii::t('app', 'Inactive'), '1' => Yii::t('app', 'Active')),
        ),
        array(
            'class' => 'CButtonColumn',
            'template' => '{view}{update}',
        )
    ),
));
?>